<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>导出自定义协议</title>
    <style>
        #codeContent{
            background: #131313;
            color:white;
            margin-top: 20px;
            word-break:break-all;
            word-wrap:break-word;
            padding: 16px;
        }
    </style>
</head>
<body>
  <div>可直接复制以下内容，在另一台设备上导入</div>
  <div id="codeContent"></div>
  <script type="text/javascript" src="js/jquery.min.js"></script>
<script>
    var protocols=parent.loadCurrentProtocols()
    var items=[];
    for(var protocol of protocols){
        items.push({
            action_name:protocol.action_name,
            action_key:protocol.action_key,
            codes:protocol.codes
        })
    }
    $("#codeContent").text(JSON.stringify(items))
</script>
</body>
</html>